import java.io.File;
import java.io.IOException;

public class Demo02 {
    public static void main(String[] args) throws IOException {
        File file1 = new File(".//tset");
        System.out.println(file1.mkdir());

        File file2 = new File(file1, "1.txt");
        System.out.println(file2.createNewFile());
        System.out.println(file2.delete());
        System.out.println(file2.createNewFile());
        System.out.println(file2.isFile());
        System.out.println("==================================");
        System.out.println(file1.isDirectory()); // 判断 file1 是否为目录
        System.out.println("==================================");
        File file3 = new File(".//test1/maykk");
        System.out.println(file3.mkdirs());
        File file4 = new File(file3,"maykk.txt");
        System.out.println(file4.createNewFile() +" "+ file4);
        System.out.println("==================================");

    }
}
